<script lang="ts">
import { onMounted, reactive, ref, nextTick } from 'vue'
import JxudpDataSourceList from './component/jxudp-data-source-list.vue'
import { jumpPath } from '/@/utils/router-kit'
import { JxudpDataSourceAddUrl } from '/@/views/org/mapping.json'

</script>
<script lang='ts' setup>
const JxudpDataSourceListRef = ref()
const JxudpDataSourceIndexState = reactive({
    /**获取表格对象 */
    getJxudpDataSourceTableExpose: (): PageTableExpose => {
        return JxudpDataSourceListRef.value.getJxudpDataSourcePageTableRef()
    },
    onAddButtonClick: () => {
        let query: any = {}
        jumpPath(JxudpDataSourceAddUrl, query)
    },
    onDelButtonClick: () => JxudpDataSourceListRef.value.onDelButtonClick(),
})

onMounted(() => {
    JxudpDataSourceIndexState.getJxudpDataSourceTableExpose().loadTable()
})
</script>
<template>
    <div>
        <jxtech-basic-header>
            <template #extra>
                <jxtech-add-button @click="JxudpDataSourceIndexState.onAddButtonClick"></jxtech-add-button>
                <jxtech-delete-button @click="JxudpDataSourceIndexState.onDelButtonClick"></jxtech-delete-button>
            </template>
        </jxtech-basic-header>
    </div>
    <jxudp-data-source-list ref="JxudpDataSourceListRef"></jxudp-data-source-list>
</template>
<style lang="scss" scoped>
::v-deep(.el-select__popper) {
    z-index: 100000 !important;
}
</style>